/*
 * @Description: 定义菜单字段类型
 * @Author: zhihong deng
 * @Date: 2021-08-22 20:35:38
 * @LastEditors: zhihong deng
 * @LastEditTime: 2021-09-17 22:09:03
 */
const mongoose = require('mongoose')
const menuSchema = mongoose.Schema({
	menuType: Number, // 菜单类型
	menuName: String,
	menuCode: String,
	path: String,
	icon: String,
	component: String,
	menuState: Number,
	parentId: [mongoose.Types.ObjectId],
	createTime: {
		type: Date,
		default: Date.now(),
	}, //创建时间
	updateTime: {
		type: Date,
		default: Date.now(),
	}, //更新时间
	remark: String,
})

module.exports = mongoose.model('menu', menuSchema, 'menus')
